package com.th.supcom.pds.recipefee.client.mvc;

import com.extjs.gxt.ui.client.mvc.AppEvent;
import com.extjs.gxt.ui.client.mvc.Controller;
import com.th.supcom.pds.recipefee.client.common.RecipeFeeModuleEvents;

/**
 * 收方收费控制器.
 * 
 * @author 杨冲
 */
public class RecipeFeeController extends Controller
{
    /** 公司版权信息. */
    public static final String copyright = "Copyright 2014, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";

    private final RecipeFeeView m_view;

    public RecipeFeeController ()
    {
        m_view = new RecipeFeeView (this);
        this.registerEventTypes (RecipeFeeModuleEvents.UI_INIT);
        this.registerEventTypes (RecipeFeeModuleEvents.RECIPEFEE_QUERY);
        this.registerEventTypes (RecipeFeeModuleEvents.RECIPEFEE_CONFIRM);
        this.registerEventTypes (RecipeFeeModuleEvents.RECIPEFEE_CLEAR);
        this.registerEventTypes (RecipeFeeModuleEvents.RECIPEFEE_PRINT);
        this.registerEventTypes (RecipeFeeModuleEvents.LOAD_DETAIL);
        this.registerEventTypes (RecipeFeeModuleEvents.CANCEL_DETAIL);
        this.registerEventTypes (RecipeFeeModuleEvents.RECIPEFEE_ADDPLASTICBAG);
    }

    @Override
    public void handleEvent (final AppEvent event)
    {
        forwardToView (m_view, event);
    }
}
